import request from '@/config/axios'
/**
 * 新增公海规则
 */
export const createRule = (data) => {
  return request.post({ url: '/setting/pool-setting/create-rule', data })
}

/**
 * 更新公海规则
 */
export const updateRule = (data) => {
  return request.put({ url: '/setting/pool-setting/update-rule', data })
}

/**
 * 删除公海规则
 */
export const deleteRule = (id) => {
  return request.delete({ url: '/setting/pool-setting/delete-rule?id=' + id })
}

/**
 * 查询公海规则
 */
export const queryRule = () => {
  return request.post({ url: '/setting/pool-setting/query-rule' })
}

/**
 * 获取单个公海规则
 */
export const getRule = (id) => {
  return request.get({ url: '/setting/pool-setting/get-rule?id=' + id })
}

/**
 * 获取最大客户限制
 */
export const getMaxLimit = (id) => {
  return request.get({ url: '/setting/pool-setting/get-max-limit?id=' + id })
}

/**
 * 新增最大客户限制
 */
export const createMaxLimit = (data) => {
  return request.post({ url: '/setting/pool-setting/create-max-limit', data })
}

/**
 * 更新最大客户限制
 */
export const updateMaxLimit = (data) => {
  return request.put({ url: '/setting/pool-setting/update-max-limit', data })
}

/**
 * 删除最大客户限制
 */
export const deleteMaxLimit = (id) => {
  return request.delete({ url: '/setting/pool-setting/delete-max-limit?id=' + id })
}

/**
 * 查询最大客户限制
 */
export const queryMaxLimit = () => {
  return request.get({ url: '/setting/pool-setting/query-max-limit' })
}
